package org.example.controller;


import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.example.entity.Delivery;
import org.example.service.IDeliveryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author author
 * @since 2024-10-09
 */
@RestController
@RequestMapping("/delivery")
@CrossOrigin
public class DeliveryController {

    @Autowired
    private IDeliveryService deliveryService;


    /**
     * 查询列表
     * @param pageNum
     * @param pageSize
     * @return
     */
    @RequestMapping("findPages")
    public Page<Delivery> findPages(Integer pageNum,Integer pageSize){
        return deliveryService.findPages(pageNum,pageSize);
    }

    /**
     * 保存
     * @param id
     */
    @RequestMapping("delete")
    public void delete(Integer id){
        deliveryService.removeById(id);
    }



}





